package com.ztgf.shopping.models.service.shop;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.common.constant.Result;
import com.ztgf.shopping.models.bo.shop.ShopEarnestMoneyDeductionBO;
import com.ztgf.shopping.models.bo.shop.ShopEarnestMoneyReturnBO;
import com.ztgf.shopping.models.bo.shop.ShopEarnestMoneySaveBO;
import com.ztgf.shopping.models.dto.shop.ShopEarnestMoneyDTO;

import java.math.BigDecimal;

/**
 * 店铺保证金服务
 *
 * @author zhanghualang
 * @Date 2020-06-16 14:38:24
 */
public interface IShopEarnestMoneyService extends IService<ShopEarnestMoneyDTO> {
    boolean add(ShopEarnestMoneySaveBO saveBO);

    ShopEarnestMoneyDTO getByShopId(Long id); //根据店铺ID获取保证金 后台使用

    boolean updatePayable(Long id, BigDecimal payable); //修改应该缴纳保证金 后台使用

    Result updateDeductionEarnest(ShopEarnestMoneyDeductionBO bo); //扣除保证金 后台使用

    void updatePayEarnest(ShopEarnestMoneyDeductionBO bo); //缴纳保证金

    Result updatePaidByBalance(Long id, String mobile, String captcha);//余额缴纳保证金

    Result updatePaidByOnline(Long id, String bankId);//网银缴纳保证金

    Result updatePaidReturn(ShopEarnestMoneyReturnBO bo); //保证金回调

    Result updateReturnMoney(Long shopId); //退换保证金
}
